package com.xinqi.modules.chat.enums.apply;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.enums.BasicEnum;
import lombok.Getter;

public enum FriendApplyIsReadEnum implements BasicEnum {
    ZERO(0, "未读"),
    ONE(1, "已读");
    @Getter(onMethod_ = {@JsonValue})
    private final int code;

    @Getter
    private final String describe;

    FriendApplyIsReadEnum(int code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static FriendApplyIsReadEnum of(Integer code) {
        return BasicEnum.of(FriendApplyIsReadEnum.class, code);
    }
}
